﻿using Architecture.Repository.Interface;
using Architeture.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain.Service
{
    public class CityService : ICityService
    {
        protected readonly ICityInfoRepository cityRep;

        public CityService(ICityInfoRepository cityRep)
        {
            this.cityRep = cityRep;
        }

        public async Task<List<CityInfo>> GetCity(int pid)
        {
            return (await cityRep.GetCity()).Where(x => x.ProvinceInfoId == pid).ToList();
        }

        
    }
}
